package com.lzy.pattern.prototype.shadowclone;

/**
 * @ClassName: Client
 * @Description: 浅克隆
 * @Author: LiuZy
 * @Date: 2022/4/17 21:47
 * @Version: 1.0
 */
public class Client {
    public static void main(String[] args) throws CloneNotSupportedException {

        Award award = new Award();
        Student student = new Student();
        student.setName("木丁西");

        award.setStu(student);

        Award award1 = award.clone();
        award1.getStu().setName("刘德华");

        System.out.println(award == award1);

        award.show();
        award1.show();
    }

}